﻿@{
    var currentPage = ViewContext.RouteData.Values["Page"]?.ToString();
}

<div class="admin-toolbar pb-2 border-bottom mb-3 d-flex">
    <div class="col">
        <ul class="nav nav-pills">
            <li role="presentation" class="nav-item nav-item-non-margin">
                <a class="nav-link @(currentPage == "/Admin/Post" ? "active" : null)" asp-page="./Post">@SharedLocalizer["Published"]</a>
            </li>
            <li role="presentation" class="nav-item nav-item-non-margin">
                <a class="nav-link @(currentPage == "/Admin/Draft" ? "active" : null)" asp-page="./Draft">@SharedLocalizer["Drafts"]</a>
            </li>
            <li role="presentation" class="nav-item nav-item-non-margin">
                <a class="nav-link @(currentPage == "/Admin/RecycleBin" ? "active" : null)" asp-page="./RecycleBin">@SharedLocalizer["Recycle Bin"]</a>
            </li>
        </ul>
    </div>
    <div class="col-auto">
        <a class="btn btn-outline-accent" asp-page="./EditPost">
            <i class="bi-plus-lg"></i>
            @SharedLocalizer["New"]
        </a>
        
        <a asp-action="ExportDownload" asp-controller="DataPorting" asp-route-type="Posts" class="btn btn-outline-accent" target="_blank">
            <i class="bi-upload"></i>
            @SharedLocalizer["Export"]
        </a>
    </div>
</div>

